package com.keven.user.controller;

import com.keven.user.fegin.CaculateFeign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@EnableEurekaClient
@EnableFeignClients(basePackages = "com.keven.user.fegin")
public class TestBController {

    @Resource
    private CaculateFeign caculateFeign;

    @GetMapping("/get")
    public Object get() {
        System.out.println("进入方法");
        String o = caculateFeign.get();
        System.out.println(o);
        return o;
    }
}
